function Inherit(sub, supper)
{
    //直接继承
    var obj = Object.create(supper.prototype);
    sub.prototype = obj;

    //设置数据描述属性
    Object.defineProperty(sub.prototype, {
        configurable: false,
        enumerable: false,
        writeable: true,
        value:sub
   })
}

//兼容性写法
function createObject(superType)
{
    function fn() { };
    fn.prototype = superType.prototype;
    return new fn();
}